﻿
using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class View_Contract_Details_ALLMap : EntityTypeConfiguration<View_Contract_Details_ALL>
    {
        public View_Contract_Details_ALLMap()
        {
            // Primary Key
            this.HasKey(t => new { t.ID });

            // Properties

            this.Property(t => t.START_NO)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.END_NO)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.SPEC_NAME)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.HARD_VERSION)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.SOFT_VERSION)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.KEY_VERSION)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("View_Contract_Details_ALL");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.START_NO).HasColumnName("START_NO");
            this.Property(t => t.END_NO).HasColumnName("END_NO");
            this.Property(t => t.SPEC_NAME).HasColumnName("SPEC_NAME");
            this.Property(t => t.HARD_VERSION).HasColumnName("HARD_VERSION");
            this.Property(t => t.SOFT_VERSION).HasColumnName("SOFT_VERSION");
            this.Property(t => t.KEY_VERSION).HasColumnName("KEY_VERSION");
            this.Property(t => t.SUPPLIER_ID).HasColumnName("SUPPLIER_ID");
            this.Property(t => t.SUPPLIER_Name).HasColumnName("SUPPLIER_Name");
        }
    }
}
